﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for Strings
/// </summary>
public class Strings
{
    public Strings()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    public static string Mid(string deger, int baslangic, int uzunluk)
    {
        string sonuc = "";
        if (deger.Length > baslangic + uzunluk - 1)
        {
            sonuc = deger.Substring(baslangic - 1, uzunluk);
        }
        else
        {
            sonuc = deger.Substring(baslangic - 1);
        }
        return sonuc;
    }
    public static string Mid(string deger, int baslangic)
    {
        return deger.Substring(baslangic);
    }
    public static String Space(int adet)
    {
        string retdeger = "";
        for (int i = 0; i < adet; i++)
        {
            retdeger += " ";
        }
        return retdeger;
    }
    public static int Len(string deger)
    {
        return deger.Length;
    }
    public static string Format(decimal sayi, string format)
    {
        return sayi.ToString(format);
    }
    public static string Format(int sayi, string format)
    {
        return sayi.ToString(format);
    }
}
